#include "../GAF/GAF.h"
#include "GDI_Include.h"
#include "GDI_Platform.h"


extern "C"
{
	int WINAPI WinMain(HINSTANCE inst,HINSTANCE dumb,LPSTR param,int show);
};

int main(int ac, char* av[])
{
	char buf[256];
	int i;
	HINSTANCE inst;
	inst = (HINSTANCE)GetModuleHandle(NULL);
	buf[0] = 0;
	for(i = 1; i < ac; i++)
	{
		strcat(buf, av[i]);
		strcat(buf, " ");
	}

	return WinMain(inst, NULL, buf, SW_SHOWNORMAL);
}

int WINAPI WinMain(HINSTANCE hInstance,
		   HINSTANCE hPrevInstance,
		   LPSTR lpCmdLine,
		   int nCmdShow)
{
	GAF_CBundle* p = &GDI_APP_PARAMS;

	GDI_APP_PARAMS.PutPointer(GDI_PRM_APP_INSTANCE_p, hInstance);
	GDI_APP_PARAMS.PutInteger(GDI_PRM_APP_CMDSHOW_n, nCmdShow);

	return GAF_Main(0, 0);
}
